import * as Pinia  from 'pinia'
export const useNewLookHistory = Pinia.defineStore('news', {
	state: () => {
		return {
			newsLookList: JSON.parse(uni.getStorageSync('newStore') || '[]')
		}
	},
	actions: {
		setNewsLog(target) {
			if(this.newsLookList.find(item => item.id === target.id)) return;
			this.newsLookList.push(target)
			uni.setStorageSync('newStore', JSON.stringify(this.newsLookList))
		}
	}
})